package com.itheima.mydemo.test3;

public class Test03 {
    public static void main(String[] args) {

        //匿名内部类
        new Inter(){
            @Override
            public void ababa() {
                System.out.println("你在无中生有");
            }
        }.ababa();

        new Student().ababa2(new Inter(){
            @Override
            public void ababa() {
                System.out.println("你在无中生有");
            }
        });

    }
}
class Student{
    public void ababa2(Inter inter){
        System.out.println("学生阿巴阿巴");
    }
}
interface Inter{
    void ababa();
}